// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.scripting.objects;

import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Stack;
import se.krka.kahlua.vm.KahluaTable;
import zombie.Lua.LuaManager;
import zombie.characterTextures.BloodClothingType;
import zombie.core.Color;
import zombie.core.Core;
import zombie.core.Rand;
import zombie.core.Translator;
import zombie.core.skinnedmodel.population.ClothingItem;
import zombie.core.skinnedmodel.population.OutfitRNG;
import zombie.core.textures.Texture;
import zombie.debug.DebugLog;
import zombie.gameStates.GameLoadingState;
import zombie.inventory.InventoryItem;
import zombie.inventory.types.AlarmClock;
import zombie.inventory.types.AlarmClockClothing;
import zombie.inventory.types.Clothing;
import zombie.inventory.types.ComboItem;
import zombie.inventory.types.DrainableComboItem;
import zombie.inventory.types.Food;
import zombie.inventory.types.HandWeapon;
import zombie.inventory.types.InventoryContainer;
import zombie.inventory.types.Key;
import zombie.inventory.types.KeyRing;
import zombie.inventory.types.Literature;
import zombie.inventory.types.MapItem;
import zombie.inventory.types.Moveable;
import zombie.inventory.types.Radio;
import zombie.inventory.types.WeaponPart;
import zombie.network.GameClient;
import zombie.network.GameServer;
import zombie.radio.devices.DeviceData;
import zombie.scripting.ScriptManager;
import zombie.util.StringUtils;
import zombie.world.WorldDictionary;
import zombie.worldMap.MapDefinitions;

public final class Item extends BaseScriptObject {
    public String clothingExtraSubmenu = null;
    public String DisplayName = null;
    public boolean Hidden = false;
    public boolean CantEat = false;
    public String Icon = "None";
    public boolean Medical = false;
    public boolean CannedFood = false;
    public boolean SurvivalGear = false;
    public boolean MechanicsItem = false;
    public boolean UseWorldItem = false;
    public float ScaleWorldIcon = 1.0F;
    public String CloseKillMove = null;
    public float WeaponLength = 0.4F;
    public float ActualWeight = 1.0F;
    public float WeightWet = 0.0F;
    public float WeightEmpty = 0.0F;
    public float HungerChange = 0.0F;
    public float CriticalChance = 20.0F;
    public int Count = 1;
    public int DaysFresh = 1000000000;
    public int DaysTotallyRotten = 1000000000;
    public int MinutesToCook = 60;
    public int MinutesToBurn = 120;
    public boolean IsCookable = false;
    private String CookingSound = null;
    public float StressChange = 0.0F;
    public float BoredomChange = 0.0F;
    public float UnhappyChange = 0.0F;
    public boolean AlwaysWelcomeGift = false;
    public String ReplaceOnDeplete = null;
    public boolean Ranged = false;
    public boolean CanStoreWater = false;
    public float MaxRange = 1.0F;
    public float MinRange = 0.0F;
    public float ThirstChange = 0.0F;
    public float FatigueChange = 0.0F;
    public float MinAngle = 1.0F;
    public boolean RequiresEquippedBothHands = false;
    public float MaxDamage = 1.5F;
    public float MinDamage = 0.0F;
    public float MinimumSwingTime = 0.0F;
    public String SwingSound = "BaseballBatSwing";
    public String WeaponSprite;
    public boolean AngleFalloff = false;
    public int SoundVolume = 0;
    public float ToHitModifier = 1.0F;
    public int SoundRadius = 0;
    public float OtherCharacterVolumeBoost;
    public final ArrayList<String> Categories = new ArrayList();
    public final ArrayList<String> Tags = new ArrayList();
    public String ImpactSound = "BaseballBatHit";
    public float SwingTime = 1.0F;
    public boolean KnockBackOnNoDeath = true;
    public boolean SplatBloodOnNoDeath = false;
    public float SwingAmountBeforeImpact = 0.0F;
    public String AmmoType = null;
    public int maxAmmo = 0;
    public String GunType = null;
    public int DoorDamage = 1;
    public int ConditionLowerChance = 1000000;
    public int ConditionMax = 10;
    public boolean CanBandage = false;
    public String name;
    public String moduleDotType;
    public int MaxHitCount = 1000;
    public boolean UseSelf = false;
    public boolean OtherHandUse = false;
    public String OtherHandRequire;
    public String PhysicsObject;
    public String SwingAnim = "Rifle";
    public float WeaponWeight = 1.0F;
    public float EnduranceChange = 0.0F;
    public String IdleAnim = "Idle";
    public String RunAnim = "Run";
    public String attachmentType = null;
    public String makeUpType = null;
    public String consolidateOption = null;
    public ArrayList<String> RequireInHandOrInventory = null;
    public String DoorHitSound = "BaseballBatHit";
    public String ReplaceOnUse = null;
    public boolean DangerousUncooked = false;
    public boolean Alcoholic = false;
    public float PushBackMod = 1.0F;
    public int SplatNumber = 2;
    public float NPCSoundBoost = 1.0F;
    public boolean RangeFalloff = false;
    public boolean UseEndurance = true;
    public boolean MultipleHitConditionAffected = true;
    public boolean ShareDamage = true;
    public boolean ShareEndurance = false;
    public boolean CanBarricade = false;
    public boolean UseWhileEquipped = true;
    public boolean UseWhileUnequipped = false;
    public int TicksPerEquipUse = 30;
    public boolean DisappearOnUse = true;
    public float UseDelta = 0.03125F;
    public boolean AlwaysKnockdown = false;
    public float EnduranceMod = 1.0F;
    public float KnockdownMod = 1.0F;
    public boolean CantAttackWithLowestEndurance = false;
    public String ReplaceOnUseOn = null;
    private String ReplaceTypes = null;
    private HashMap<String, String> ReplaceTypesMap = null;
    public boolean IsWaterSource = false;
    public ArrayList<String> attachmentsProvided = null;
    public String FoodType = null;
    public boolean Poison = false;
    public Integer PoisonDetectionLevel = null;
    public int PoisonPower = 0;
    public KahluaTable DefaultModData = null;
    public boolean IsAimedFirearm = false;
    public boolean IsAimedHandWeapon = false;
    public boolean CanStack = true;
    public float AimingMod = 1.0F;
    public int ProjectileCount = 1;
    public float HitAngleMod = 0.0F;
    public float SplatSize = 1.0F;
    public float Temperature = 0.0F;
    public int NumberOfPages = -1;
    public int LvlSkillTrained = -1;
    public int NumLevelsTrained = 1;
    public String SkillTrained = "";
    public int Capacity = 0;
    public int WeightReduction = 0;
    public String SubCategory = "";
    public boolean ActivatedItem = false;
    public float LightStrength = 0.0F;
    public boolean TorchCone = false;
    public int LightDistance = 0;
    public String CanBeEquipped = "";
    public boolean TwoHandWeapon = false;
    public String CustomContextMenu = null;
    public String Tooltip = null;
    public List<String> ReplaceOnCooked = null;
    public String DisplayCategory = null;
    public Boolean Trap = false;
    public boolean OBSOLETE = false;
    public boolean FishingLure = false;
    public boolean canBeWrite = false;
    public int AimingPerkCritModifier = 0;
    public float AimingPerkRangeModifier = 0.0F;
    public float AimingPerkHitChanceModifier = 0.0F;
    public int HitChance = 0;
    public float AimingPerkMinAngleModifier = 0.0F;
    public int RecoilDelay = 0;
    public boolean PiercingBullets = false;
    public float SoundGain = 1.0F;
    public boolean ProtectFromRainWhenEquipped = false;
    private float maxRangeModifier = 0.0F;
    private float minRangeRangedModifier = 0.0F;
    private float damageModifier = 0.0F;
    private float recoilDelayModifier = 0.0F;
    private int clipSizeModifier = 0;
    private ArrayList<String> mountOn = null;
    private String partType = null;
    private int ClipSize = 0;
    private int reloadTime = 0;
    private int reloadTimeModifier = 0;
    private int aimingTime = 0;
    private int aimingTimeModifier = 0;
    private int hitChanceModifier = 0;
    private float angleModifier = 0.0F;
    private float weightModifier = 0.0F;
    private int PageToWrite = 0;
    private boolean RemoveNegativeEffectOnCooked = false;
    private int treeDamage = 0;
    private float alcoholPower = 0.0F;
    private String PutInSound = null;
    private String PlaceOneSound = null;
    private String PlaceMultipleSound = null;
    private String OpenSound = null;
    private String CloseSound = null;
    private String breakSound = null;
    private String customEatSound = null;
    private String fillFromDispenserSound = null;
    private String fillFromTapSound = null;
    private String bulletOutSound = null;
    private String ShellFallSound = null;
    private HashMap<String, String> SoundMap = null;
    private float bandagePower = 0.0F;
    private float ReduceInfectionPower = 0.0F;
    private String OnCooked = null;
    private String OnlyAcceptCategory = null;
    private String AcceptItemFunction = null;
    private boolean padlock = false;
    private boolean digitalPadlock = false;
    private List<String> teachedRecipes = null;
    private int triggerExplosionTimer = 0;
    private boolean canBePlaced = false;
    private int explosionRange = 0;
    private int explosionPower = 0;
    private int fireRange = 0;
    private int firePower = 0;
    private int smokeRange = 0;
    private int noiseRange = 0;
    private int noiseDuration = 0;
    private float extraDamage = 0.0F;
    private int explosionTimer = 0;
    private String PlacedSprite = null;
    private boolean canBeReused = false;
    private int sensorRange = 0;
    private boolean canBeRemote = false;
    private boolean remoteController = false;
    private int remoteRange = 0;
    private String countDownSound = null;
    private String explosionSound = null;
    private int fluReduction = 0;
    private int ReduceFoodSickness = 0;
    private int painReduction = 0;
    private float rainFactor = 0.0F;
    public float torchDot = 0.96F;
    public int colorRed = 255;
    public int colorGreen = 255;
    public int colorBlue = 255;
    public boolean twoWay = false;
    public int transmitRange = 0;
    public int micRange = 0;
    public float baseVolumeRange = 0.0F;
    public boolean isPortable = false;
    public boolean isTelevision = false;
    public int minChannel = 88000;
    public int maxChannel = 108000;
    public boolean usesBattery = false;
    public boolean isHighTier = false;
    public String HerbalistType;
    private float carbohydrates = 0.0F;
    private float lipids = 0.0F;
    private float proteins = 0.0F;
    private float calories = 0.0F;
    private boolean packaged = false;
    private boolean cantBeFrozen = false;
    private String evolvedRecipeName = null;
    private String ReplaceOnRotten = null;
    private float metalValue = 0.0F;
    private String AlarmSound = null;
    private String itemWhenDry = null;
    private float wetCooldown = 0.0F;
    private boolean isWet = false;
    private String onEat = null;
    private boolean cantBeConsolided = false;
    private boolean BadInMicrowave = false;
    private boolean GoodHot = false;
    private boolean BadCold = false;
    public String map = null;
    private boolean keepOnDeplete = false;
    public int vehicleType = 0;
    private int maxCapacity = -1;
    private int itemCapacity = -1;
    private boolean ConditionAffectsCapacity = false;
    private float brakeForce = 0.0F;
    private int chanceToSpawnDamaged = 0;
    private float conditionLowerNormal = 0.0F;
    private float conditionLowerOffroad = 0.0F;
    private float wheelFriction = 0.0F;
    private float suspensionDamping = 0.0F;
    private float suspensionCompression = 0.0F;
    private float engineLoudness = 0.0F;
    public String ClothingItem = null;
    private ClothingItem clothingItemAsset = null;
    private String staticModel = null;
    public String primaryAnimMask = null;
    public String secondaryAnimMask = null;
    public String primaryAnimMaskAttachment = null;
    public String secondaryAnimMaskAttachment = null;
    public String replaceInSecondHand = null;
    public String replaceInPrimaryHand = null;
    public String replaceWhenUnequip = null;
    public ItemReplacement replacePrimaryHand = null;
    public ItemReplacement replaceSecondHand = null;
    public String worldObjectSprite = null;
    public String ItemName;
    public Texture NormalTexture;
    public List<Texture> SpecialTextures = new ArrayList();
    public List<String> SpecialWorldTextureNames = new ArrayList();
    public String WorldTextureName;
    public Texture WorldTexture;
    public String eatType;
    private ArrayList<String> IconsForTexture;
    private float baseSpeed = 1.0F;
    private ArrayList<BloodClothingType> bloodClothingType;
    private float stompPower = 1.0F;
    public float runSpeedModifier = 1.0F;
    public float combatSpeedModifier = 1.0F;
    public ArrayList<String> clothingItemExtra;
    public ArrayList<String> clothingItemExtraOption;
    private Boolean removeOnBroken = false;
    public Boolean canHaveHoles = true;
    private boolean cosmetic = false;
    private String ammoBox = null;
    public boolean hairDye = false;
    private String insertAmmoStartSound = null;
    private String insertAmmoSound = null;
    private String insertAmmoStopSound = null;
    private String ejectAmmoStartSound = null;
    private String ejectAmmoSound = null;
    private String ejectAmmoStopSound = null;
    private String rackSound = null;
    private String clickSound = "Stormy9mmClick";
    private String equipSound = null;
    private String unequipSound = null;
    private String bringToBearSound = null;
    private String magazineType = null;
    private String weaponReloadType = null;
    private boolean rackAfterShoot = false;
    private float jamGunChance = 1.0F;
    private ArrayList<ModelWeaponPart> modelWeaponPart = null;
    private boolean haveChamber = true;
    private boolean manuallyRemoveSpentRounds = false;
    private float biteDefense = 0.0F;
    private float scratchDefense = 0.0F;
    private float bulletDefense = 0.0F;
    private String damageCategory = null;
    private boolean damageMakeHole = false;
    public float neckProtectionModifier = 1.0F;
    private String attachmentReplacement = null;
    private boolean insertAllBulletsReload = false;
    private int chanceToFall = 0;
    public String fabricType = null;
    public boolean equippedNoSprint = false;
    public String worldStaticModel = null;
    private float critDmgMultiplier = 0.0F;
    private float insulation = 0.0F;
    private float windresist = 0.0F;
    private float waterresist = 0.0F;
    private String fireMode = null;
    private ArrayList<String> fireModePossibilities = null;
    public boolean RemoveUnhappinessWhenCooked = false;
    private short registry_id = -1;
    private boolean existsAsVanilla = false;
    private String modID;
    private String fileAbsPath;
    public float stopPower = 5.0F;
    private String recordedMediaCat;
    private byte acceptMediaType = -1;
    private boolean noTransmit = false;
    private boolean worldRender = true;
    private String LuaCreate = null;
    private HashMap<String, String> soundParameterMap = null;
    public String HitSound = "BaseballBatHit";
    public String hitFloorSound = "BatOnFloor";
    public String BodyLocation = "";
    public Stack<String> PaletteChoices = new Stack();
    public String SpriteName = null;
    public String PalettesStart = "";
    public static HashMap<Integer, String> NetIDToItem = new HashMap();
    public static HashMap<String, Integer> NetItemToID = new HashMap();
    static int IDMax = 0;
    public Item.Type type = Item.Type.Normal;
    private boolean Spice = false;
    private int UseForPoison;

    public String getDisplayName() {
        return this.DisplayName;
    }

    public void setDisplayName(String _DisplayName) {
        this.DisplayName = _DisplayName;
    }

    public boolean isHidden() {
        return this.Hidden;
    }

    public String getDisplayCategory() {
        return this.DisplayCategory;
    }

    public String getIcon() {
        return this.Icon;
    }

    public void setIcon(String _Icon) {
        this.Icon = _Icon;
    }

    public int getNoiseDuration() {
        return this.noiseDuration;
    }

    public Texture getNormalTexture() {
        return this.NormalTexture;
    }

    public int getNumberOfPages() {
        return this.NumberOfPages;
    }

    public float getActualWeight() {
        return this.ActualWeight;
    }

    public void setActualWeight(float _ActualWeight) {
        this.ActualWeight = _ActualWeight;
    }

    public float getWeightWet() {
        return this.WeightWet;
    }

    public void setWeightWet(float weight) {
        this.WeightWet = weight;
    }

    public float getWeightEmpty() {
        return this.WeightEmpty;
    }

    public void setWeightEmpty(float weight) {
        this.WeightEmpty = weight;
    }

    public float getHungerChange() {
        return this.HungerChange;
    }

    public void setHungerChange(float _HungerChange) {
        this.HungerChange = _HungerChange;
    }

    public float getThirstChange() {
        return this.ThirstChange;
    }

    public void setThirstChange(float _ThirstChange) {
        this.ThirstChange = _ThirstChange;
    }

    public int getCount() {
        return this.Count;
    }

    public void setCount(int _Count) {
        this.Count = _Count;
    }

    public int getDaysFresh() {
        return this.DaysFresh;
    }

    public void setDaysFresh(int _DaysFresh) {
        this.DaysFresh = _DaysFresh;
    }

    public int getDaysTotallyRotten() {
        return this.DaysTotallyRotten;
    }

    public void setDaysTotallyRotten(int _DaysTotallyRotten) {
        this.DaysTotallyRotten = _DaysTotallyRotten;
    }

    public int getMinutesToCook() {
        return this.MinutesToCook;
    }

    public void setMinutesToCook(int _MinutesToCook) {
        this.MinutesToCook = _MinutesToCook;
    }

    public int getMinutesToBurn() {
        return this.MinutesToBurn;
    }

    public void setMinutesToBurn(int _MinutesToBurn) {
        this.MinutesToBurn = _MinutesToBurn;
    }

    public boolean isIsCookable() {
        return this.IsCookable;
    }

    public void setIsCookable(boolean _IsCookable) {
        this.IsCookable = _IsCookable;
    }

    public String getCookingSound() {
        return this.CookingSound;
    }

    public float getStressChange() {
        return this.StressChange;
    }

    public void setStressChange(float _StressChange) {
        this.StressChange = _StressChange;
    }

    public float getBoredomChange() {
        return this.BoredomChange;
    }

    public void setBoredomChange(float _BoredomChange) {
        this.BoredomChange = _BoredomChange;
    }

    public float getUnhappyChange() {
        return this.UnhappyChange;
    }

    public void setUnhappyChange(float _UnhappyChange) {
        this.UnhappyChange = _UnhappyChange;
    }

    public boolean isAlwaysWelcomeGift() {
        return this.AlwaysWelcomeGift;
    }

    public void setAlwaysWelcomeGift(boolean _AlwaysWelcomeGift) {
        this.AlwaysWelcomeGift = _AlwaysWelcomeGift;
    }

    public boolean isRanged() {
        return this.Ranged;
    }

    public boolean getCanStoreWater() {
        return this.CanStoreWater;
    }

    public void setRanged(boolean _Ranged) {
        this.Ranged = _Ranged;
    }

    public float getMaxRange() {
        return this.MaxRange;
    }

    public void setMaxRange(float _MaxRange) {
        this.MaxRange = _MaxRange;
    }

    public float getMinAngle() {
        return this.MinAngle;
    }

    public void setMinAngle(float _MinAngle) {
        this.MinAngle = _MinAngle;
    }

    public float getMaxDamage() {
        return this.MaxDamage;
    }

    public void setMaxDamage(float _MaxDamage) {
        this.MaxDamage = _MaxDamage;
    }

    public float getMinDamage() {
        return this.MinDamage;
    }

    public void setMinDamage(float _MinDamage) {
        this.MinDamage = _MinDamage;
    }

    public float getMinimumSwingTime() {
        return this.MinimumSwingTime;
    }

    public void setMinimumSwingTime(float _MinimumSwingTime) {
        this.MinimumSwingTime = _MinimumSwingTime;
    }

    public String getSwingSound() {
        return this.SwingSound;
    }

    public void setSwingSound(String _SwingSound) {
        this.SwingSound = _SwingSound;
    }

    public String getWeaponSprite() {
        return this.WeaponSprite;
    }

    public void setWeaponSprite(String _WeaponSprite) {
        this.WeaponSprite = _WeaponSprite;
    }

    public boolean isAngleFalloff() {
        return this.AngleFalloff;
    }

    public void setAngleFalloff(boolean _AngleFalloff) {
        this.AngleFalloff = _AngleFalloff;
    }

    public int getSoundVolume() {
        return this.SoundVolume;
    }

    public void setSoundVolume(int _SoundVolume) {
        this.SoundVolume = _SoundVolume;
    }

    public float getToHitModifier() {
        return this.ToHitModifier;
    }

    public void setToHitModifier(float _ToHitModifier) {
        this.ToHitModifier = _ToHitModifier;
    }

    public int getSoundRadius() {
        return this.SoundRadius;
    }

    public void setSoundRadius(int _SoundRadius) {
        this.SoundRadius = _SoundRadius;
    }

    public float getOtherCharacterVolumeBoost() {
        return this.OtherCharacterVolumeBoost;
    }

    public void setOtherCharacterVolumeBoost(float _OtherCharacterVolumeBoost) {
        this.OtherCharacterVolumeBoost = _OtherCharacterVolumeBoost;
    }

    public ArrayList<String> getCategories() {
        return this.Categories;
    }

    public void setCategories(ArrayList<String> _Categories) {
        this.Categories.clear();
        this.Categories.addAll(_Categories);
    }

    public ArrayList<String> getTags() {
        return this.Tags;
    }

    public String getImpactSound() {
        return this.ImpactSound;
    }

    public void setImpactSound(String _ImpactSound) {
        this.ImpactSound = _ImpactSound;
    }

    public float getSwingTime() {
        return this.SwingTime;
    }

    public void setSwingTime(float _SwingTime) {
        this.SwingTime = _SwingTime;
    }

    public boolean isKnockBackOnNoDeath() {
        return this.KnockBackOnNoDeath;
    }

    public void setKnockBackOnNoDeath(boolean _KnockBackOnNoDeath) {
        this.KnockBackOnNoDeath = _KnockBackOnNoDeath;
    }

    public boolean isSplatBloodOnNoDeath() {
        return this.SplatBloodOnNoDeath;
    }

    public void setSplatBloodOnNoDeath(boolean _SplatBloodOnNoDeath) {
        this.SplatBloodOnNoDeath = _SplatBloodOnNoDeath;
    }

    public float getSwingAmountBeforeImpact() {
        return this.SwingAmountBeforeImpact;
    }

    public void setSwingAmountBeforeImpact(float _SwingAmountBeforeImpact) {
        this.SwingAmountBeforeImpact = _SwingAmountBeforeImpact;
    }

    public String getAmmoType() {
        return this.AmmoType;
    }

    public void setAmmoType(String _AmmoType) {
        this.AmmoType = _AmmoType;
    }

    public int getDoorDamage() {
        return this.DoorDamage;
    }

    public void setDoorDamage(int _DoorDamage) {
        this.DoorDamage = _DoorDamage;
    }

    public int getConditionLowerChance() {
        return this.ConditionLowerChance;
    }

    public void setConditionLowerChance(int _ConditionLowerChance) {
        this.ConditionLowerChance = _ConditionLowerChance;
    }

    public int getConditionMax() {
        return this.ConditionMax;
    }

    public void setConditionMax(int _ConditionMax) {
        this.ConditionMax = _ConditionMax;
    }

    public boolean isCanBandage() {
        return this.CanBandage;
    }

    public void setCanBandage(boolean _CanBandage) {
        this.CanBandage = _CanBandage;
    }

    public boolean isCosmetic() {
        return this.cosmetic;
    }

    public String getName() {
        return this.name;
    }

    public String getModuleName() {
        return this.module.name;
    }

    public String getFullName() {
        return this.moduleDotType;
    }

    public void setName(String _name) {
        this.name = _name;
        this.moduleDotType = this.module.name + "." + _name;
    }

    public int getMaxHitCount() {
        return this.MaxHitCount;
    }

    public void setMaxHitCount(int _MaxHitCount) {
        this.MaxHitCount = _MaxHitCount;
    }

    public boolean isUseSelf() {
        return this.UseSelf;
    }

    public void setUseSelf(boolean _UseSelf) {
        this.UseSelf = _UseSelf;
    }

    public boolean isOtherHandUse() {
        return this.OtherHandUse;
    }

    public void setOtherHandUse(boolean _OtherHandUse) {
        this.OtherHandUse = _OtherHandUse;
    }

    public String getOtherHandRequire() {
        return this.OtherHandRequire;
    }

    public void setOtherHandRequire(String _OtherHandRequire) {
        this.OtherHandRequire = _OtherHandRequire;
    }

    public String getPhysicsObject() {
        return this.PhysicsObject;
    }

    public void setPhysicsObject(String _PhysicsObject) {
        this.PhysicsObject = _PhysicsObject;
    }

    public String getSwingAnim() {
        return this.SwingAnim;
    }

    public void setSwingAnim(String _SwingAnim) {
        this.SwingAnim = _SwingAnim;
    }

    public float getWeaponWeight() {
        return this.WeaponWeight;
    }

    public void setWeaponWeight(float _WeaponWeight) {
        this.WeaponWeight = _WeaponWeight;
    }

    public float getEnduranceChange() {
        return this.EnduranceChange;
    }

    public void setEnduranceChange(float _EnduranceChange) {
        this.EnduranceChange = _EnduranceChange;
    }

    public String getBreakSound() {
        return this.breakSound;
    }

    public String getBulletOutSound() {
        return this.bulletOutSound;
    }

    public String getCloseSound() {
        return this.CloseSound;
    }

    public String getClothingItem() {
        return this.ClothingItem;
    }

    public void setClothingItemAsset(ClothingItem asset) {
        this.clothingItemAsset = asset;
    }

    public ClothingItem getClothingItemAsset() {
        return this.clothingItemAsset;
    }

    public ArrayList<String> getClothingItemExtra() {
        return this.clothingItemExtra;
    }

    public ArrayList<String> getClothingItemExtraOption() {
        return this.clothingItemExtraOption;
    }

    public String getFabricType() {
        return this.fabricType;
    }

    public ArrayList<String> getIconsForTexture() {
        return this.IconsForTexture;
    }

    public String getCustomEatSound() {
        return this.customEatSound;
    }

    public String getFillFromDispenserSound() {
        return this.fillFromDispenserSound;
    }

    public String getFillFromTapSound() {
        return this.fillFromTapSound;
    }

    public String getEatType() {
        return this.eatType;
    }

    public String getCountDownSound() {
        return this.countDownSound;
    }

    public String getBringToBearSound() {
        return this.bringToBearSound;
    }

    public String getEjectAmmoStartSound() {
        return this.ejectAmmoStartSound;
    }

    public String getEjectAmmoSound() {
        return this.ejectAmmoSound;
    }

    public String getEjectAmmoStopSound() {
        return this.ejectAmmoStopSound;
    }

    public String getInsertAmmoStartSound() {
        return this.insertAmmoStartSound;
    }

    public String getInsertAmmoSound() {
        return this.insertAmmoSound;
    }

    public String getInsertAmmoStopSound() {
        return this.insertAmmoStopSound;
    }

    public String getEquipSound() {
        return this.equipSound;
    }

    public String getUnequipSound() {
        return this.unequipSound;
    }

    public String getExplosionSound() {
        return this.explosionSound;
    }

    public String getStaticModel() {
        return this.staticModel;
    }

    public String getOpenSound() {
        return this.OpenSound;
    }

    public String getPutInSound() {
        return this.PutInSound;
    }

    public String getPlaceOneSound() {
        return this.PlaceOneSound;
    }

    public String getPlaceMultipleSound() {
        return this.PlaceMultipleSound;
    }

    public String getShellFallSound() {
        return this.ShellFallSound;
    }

    public String getSoundByID(String ID) {
        return this.SoundMap == null ? null : (String)this.SoundMap.getOrDefault(ID, null);
    }

    public String getSkillTrained() {
        return this.SkillTrained;
    }

    public String getDoorHitSound() {
        return this.DoorHitSound;
    }

    public void setDoorHitSound(String _DoorHitSound) {
        this.DoorHitSound = _DoorHitSound;
    }

    public boolean isManuallyRemoveSpentRounds() {
        return this.manuallyRemoveSpentRounds;
    }

    public float getRainFactor() {
        return this.rainFactor;
    }

    public String getReplaceOnUse() {
        return this.ReplaceOnUse;
    }

    public void setReplaceOnUse(String _ReplaceOnUse) {
        this.ReplaceOnUse = _ReplaceOnUse;
    }

    public String getReplaceOnDeplete() {
        return this.ReplaceOnDeplete;
    }

    public void setReplaceOnDeplete(String _ReplaceOnDeplete) {
        this.ReplaceOnDeplete = _ReplaceOnDeplete;
    }

    public String getReplaceTypes() {
        return this.ReplaceTypes;
    }

    public HashMap<String, String> getReplaceTypesMap() {
        return this.ReplaceTypesMap;
    }

    public String getReplaceType(String key) {
        return this.ReplaceTypesMap == null ? null : (String)this.ReplaceTypesMap.get(key);
    }

    public boolean hasReplaceType(String key) {
        return this.getReplaceType(key) != null;
    }

    public boolean isDangerousUncooked() {
        return this.DangerousUncooked;
    }

    public void setDangerousUncooked(boolean _DangerousUncooked) {
        this.DangerousUncooked = _DangerousUncooked;
    }

    public boolean isAlcoholic() {
        return this.Alcoholic;
    }

    public void setAlcoholic(boolean _Alcoholic) {
        this.Alcoholic = _Alcoholic;
    }

    public float getPushBackMod() {
        return this.PushBackMod;
    }

    public void setPushBackMod(float _PushBackMod) {
        this.PushBackMod = _PushBackMod;
    }

    public int getSplatNumber() {
        return this.SplatNumber;
    }

    public void setSplatNumber(int _SplatNumber) {
        this.SplatNumber = _SplatNumber;
    }

    public float getNPCSoundBoost() {
        return this.NPCSoundBoost;
    }

    public void setNPCSoundBoost(float _NPCSoundBoost) {
        this.NPCSoundBoost = _NPCSoundBoost;
    }

    public boolean isRangeFalloff() {
        return this.RangeFalloff;
    }

    public void setRangeFalloff(boolean _RangeFalloff) {
        this.RangeFalloff = _RangeFalloff;
    }

    public boolean isUseEndurance() {
        return this.UseEndurance;
    }

    public void setUseEndurance(boolean _UseEndurance) {
        this.UseEndurance = _UseEndurance;
    }

    public boolean isMultipleHitConditionAffected() {
        return this.MultipleHitConditionAffected;
    }

    public void setMultipleHitConditionAffected(boolean _MultipleHitConditionAffected) {
        this.MultipleHitConditionAffected = _MultipleHitConditionAffected;
    }

    public boolean isShareDamage() {
        return this.ShareDamage;
    }

    public void setShareDamage(boolean _ShareDamage) {
        this.ShareDamage = _ShareDamage;
    }

    public boolean isShareEndurance() {
        return this.ShareEndurance;
    }

    public void setShareEndurance(boolean _ShareEndurance) {
        this.ShareEndurance = _ShareEndurance;
    }

    public boolean isCanBarricade() {
        return this.CanBarricade;
    }

    public void setCanBarricade(boolean _CanBarricade) {
        this.CanBarricade = _CanBarricade;
    }

    public boolean isUseWhileEquipped() {
        return this.UseWhileEquipped;
    }

    public void setUseWhileEquipped(boolean _UseWhileEquipped) {
        this.UseWhileEquipped = _UseWhileEquipped;
    }

    public boolean isUseWhileUnequipped() {
        return this.UseWhileUnequipped;
    }

    public void setUseWhileUnequipped(boolean _UseWhileUnequipped) {
        this.UseWhileUnequipped = _UseWhileUnequipped;
    }

    public void setTicksPerEquipUse(int _TicksPerEquipUse) {
        this.TicksPerEquipUse = _TicksPerEquipUse;
    }

    public float getTicksPerEquipUse() {
        return (float)this.TicksPerEquipUse;
    }

    public boolean isDisappearOnUse() {
        return this.DisappearOnUse;
    }

    public void setDisappearOnUse(boolean _DisappearOnUse) {
        this.DisappearOnUse = _DisappearOnUse;
    }

    public float getUseDelta() {
        return this.UseDelta;
    }

    public void setUseDelta(float _UseDelta) {
        this.UseDelta = _UseDelta;
    }

    public boolean isAlwaysKnockdown() {
        return this.AlwaysKnockdown;
    }

    public void setAlwaysKnockdown(boolean _AlwaysKnockdown) {
        this.AlwaysKnockdown = _AlwaysKnockdown;
    }

    public float getEnduranceMod() {
        return this.EnduranceMod;
    }

    public void setEnduranceMod(float _EnduranceMod) {
        this.EnduranceMod = _EnduranceMod;
    }

    public float getKnockdownMod() {
        return this.KnockdownMod;
    }

    public void setKnockdownMod(float _KnockdownMod) {
        this.KnockdownMod = _KnockdownMod;
    }

    public boolean isCantAttackWithLowestEndurance() {
        return this.CantAttackWithLowestEndurance;
    }

    public void setCantAttackWithLowestEndurance(boolean _CantAttackWithLowestEndurance) {
        this.CantAttackWithLowestEndurance = _CantAttackWithLowestEndurance;
    }

    public String getBodyLocation() {
        return this.BodyLocation;
    }

    public void setBodyLocation(String bodyLocation) {
        this.BodyLocation = bodyLocation;
    }

    public Stack<String> getPaletteChoices() {
        return this.PaletteChoices;
    }

    public void setPaletteChoices(Stack<String> _PaletteChoices) {
        this.PaletteChoices = _PaletteChoices;
    }

    public String getSpriteName() {
        return this.SpriteName;
    }

    public void setSpriteName(String _SpriteName) {
        this.SpriteName = _SpriteName;
    }

    public String getPalettesStart() {
        return this.PalettesStart;
    }

    public void setPalettesStart(String _PalettesStart) {
        this.PalettesStart = _PalettesStart;
    }

    public Item.Type getType() {
        return this.type;
    }

    public void setType(Item.Type _type) {
        this.type = _type;
    }

    public String getTypeString() {
        return this.type.name();
    }

    public String getMapID() {
        return this.map;
    }

    @Override
    public void Load(String string0, String[] string2) {
        this.name = string0;
        this.moduleDotType = this.module.name + "." + string0;
        int _int = IDMax++;
        NetIDToItem.put(_int, this.moduleDotType);
        NetItemToID.put(this.moduleDotType, _int);
        this.modID = ScriptManager.getCurrentLoadFileMod();
        if (this.modID.equals("pz-vanilla")) {
            this.existsAsVanilla = true;
        }

        this.fileAbsPath = ScriptManager.getCurrentLoadFileAbsPath();

        for (String string1 : string2) {
            this.DoParam(string1);
        }

        if (this.DisplayName == null) {
            this.DisplayName = this.getFullName();
            this.Hidden = true;
        }

        if (!StringUtils.isNullOrWhitespace(this.replaceInPrimaryHand)) {
            String[] string3 = this.replaceInPrimaryHand.trim().split("\\s+");
            if (string3.length == 2) {
                this.replacePrimaryHand = new ItemReplacement();
                this.replacePrimaryHand.clothingItemName = string3[0].trim();
                this.replacePrimaryHand.maskVariableValue = string3[1].trim();
                this.replacePrimaryHand.maskVariableName = "RightHandMask";
            }
        }

        if (!StringUtils.isNullOrWhitespace(this.replaceInSecondHand)) {
            String[] string4 = this.replaceInSecondHand.trim().split("\\s+");
            if (string4.length == 2) {
                this.replaceSecondHand = new ItemReplacement();
                this.replaceSecondHand.clothingItemName = string4[0].trim();
                this.replaceSecondHand.maskVariableValue = string4[1].trim();
                this.replaceSecondHand.maskVariableName = "LeftHandMask";
            }
        }

        if (!StringUtils.isNullOrWhitespace(this.primaryAnimMask)) {
            this.replacePrimaryHand = new ItemReplacement();
            this.replacePrimaryHand.maskVariableValue = this.primaryAnimMask;
            this.replacePrimaryHand.maskVariableName = "RightHandMask";
            this.replacePrimaryHand.attachment = this.primaryAnimMaskAttachment;
        }

        if (!StringUtils.isNullOrWhitespace(this.secondaryAnimMask)) {
            this.replaceSecondHand = new ItemReplacement();
            this.replaceSecondHand.maskVariableValue = this.secondaryAnimMask;
            this.replaceSecondHand.maskVariableName = "LeftHandMask";
            this.replaceSecondHand.attachment = this.secondaryAnimMaskAttachment;
        }

        WorldDictionary.onLoadItem(this);
    }

    public InventoryItem InstanceItem(String param) {
        Object object = null;
        if (this.type == Item.Type.Key) {
            object = new Key(this.module.name, this.DisplayName, this.name, "Item_" + this.Icon);
            ((Key)object).setDigitalPadlock(this.digitalPadlock);
            ((Key)object).setPadlock(this.padlock);
            if (((Key)object).isPadlock()) {
                ((Key)object).setNumberOfKey(2);
                ((Key)object).setKeyId(Rand.Next(10000000));
            }
        }

        if (this.type == Item.Type.KeyRing) {
            object = new KeyRing(this.module.name, this.DisplayName, this.name, "Item_" + this.Icon);
        }

        if (this.type == Item.Type.WeaponPart) {
            object = new WeaponPart(this.module.name, this.DisplayName, this.name, "Item_" + this.Icon);
            WeaponPart weaponPart = (WeaponPart)object;
            weaponPart.setDamage(this.damageModifier);
            weaponPart.setClipSize(this.clipSizeModifier);
            weaponPart.setMaxRange(this.maxRangeModifier);
            weaponPart.setMinRangeRanged(this.minRangeRangedModifier);
            weaponPart.setRecoilDelay(this.recoilDelayModifier);
            weaponPart.setMountOn(this.mountOn);
            weaponPart.setPartType(this.partType);
            weaponPart.setReloadTime(this.reloadTimeModifier);
            weaponPart.setAimingTime(this.aimingTimeModifier);
            weaponPart.setHitChance(this.hitChanceModifier);
            weaponPart.setAngle(this.angleModifier);
            weaponPart.setWeightModifier(this.weightModifier);
        }

        if (this.type == Item.Type.Container) {
            object = new InventoryContainer(this.module.name, this.DisplayName, this.name, "Item_" + this.Icon);
            InventoryContainer inventoryContainer = (InventoryContainer)object;
            inventoryContainer.setItemCapacity((float)this.Capacity);
            inventoryContainer.setCapacity(this.Capacity);
            inventoryContainer.setWeightReduction(this.WeightReduction);
            inventoryContainer.setCanBeEquipped(this.CanBeEquipped);
            inventoryContainer.getInventory().setPutSound(this.PutInSound);
            inventoryContainer.getInventory().setCloseSound(this.CloseSound);
            inventoryContainer.getInventory().setOpenSound(this.OpenSound);
            inventoryContainer.getInventory().setOnlyAcceptCategory(this.OnlyAcceptCategory);
            inventoryContainer.getInventory().setAcceptItemFunction(this.AcceptItemFunction);
        }

        if (this.type == Item.Type.Food) {
            object = new Food(this.module.name, this.DisplayName, this.name, this);
            Food food = (Food)object;
            food.Poison = this.Poison;
            food.setPoisonLevelForRecipe(this.PoisonDetectionLevel);
            food.setFoodType(this.FoodType);
            food.setPoisonPower(this.PoisonPower);
            food.setUseForPoison(this.UseForPoison);
            food.setThirstChange(this.ThirstChange / 100.0F);
            food.setHungChange(this.HungerChange / 100.0F);
            food.setBaseHunger(this.HungerChange / 100.0F);
            food.setEndChange(this.EnduranceChange / 100.0F);
            food.setOffAge(this.DaysFresh);
            food.setOffAgeMax(this.DaysTotallyRotten);
            food.setIsCookable(this.IsCookable);
            food.setMinutesToCook((float)this.MinutesToCook);
            food.setMinutesToBurn((float)this.MinutesToBurn);
            food.setbDangerousUncooked(this.DangerousUncooked);
            food.setReplaceOnUse(this.ReplaceOnUse);
            food.setReplaceOnCooked(this.ReplaceOnCooked);
            food.setSpice(this.Spice);
            food.setRemoveNegativeEffectOnCooked(this.RemoveNegativeEffectOnCooked);
            food.setCustomEatSound(this.customEatSound);
            food.setOnCooked(this.OnCooked);
            food.setFluReduction(this.fluReduction);
            food.setReduceFoodSickness(this.ReduceFoodSickness);
            food.setPainReduction((float)this.painReduction);
            food.setHerbalistType(this.HerbalistType);
            food.setCarbohydrates(this.carbohydrates);
            food.setLipids(this.lipids);
            food.setProteins(this.proteins);
            food.setCalories(this.calories);
            food.setPackaged(this.packaged);
            food.setCanBeFrozen(!this.cantBeFrozen);
            food.setReplaceOnRotten(this.ReplaceOnRotten);
            food.setOnEat(this.onEat);
            food.setBadInMicrowave(this.BadInMicrowave);
            food.setGoodHot(this.GoodHot);
            food.setBadCold(this.BadCold);
        }

        if (this.type == Item.Type.Literature) {
            object = new Literature(this.module.name, this.DisplayName, this.name, this);
            Literature literature = (Literature)object;
            literature.setReplaceOnUse(this.ReplaceOnUse);
            literature.setNumberOfPages(this.NumberOfPages);
            literature.setAlreadyReadPages(0);
            literature.setSkillTrained(this.SkillTrained);
            literature.setLvlSkillTrained(this.LvlSkillTrained);
            literature.setNumLevelsTrained(this.NumLevelsTrained);
            literature.setCanBeWrite(this.canBeWrite);
            literature.setPageToWrite(this.PageToWrite);
            literature.setTeachedRecipes(this.teachedRecipes);
        } else if (this.type == Item.Type.AlarmClock) {
            object = new AlarmClock(this.module.name, this.DisplayName, this.name, this);
            AlarmClock alarmClock = (AlarmClock)object;
            alarmClock.setAlarmSound(this.AlarmSound);
            alarmClock.setSoundRadius(this.SoundRadius);
        } else if (this.type == Item.Type.AlarmClockClothing) {
            String string0 = "";
            String string1 = null;
            if (!this.PaletteChoices.isEmpty() || param != null) {
                int int0 = Rand.Next(this.PaletteChoices.size());
                string1 = (String)this.PaletteChoices.get(int0);
                if (param != null) {
                    string1 = param;
                }

                string0 = "_" + string1.replace(this.PalettesStart, "");
            }

            object = new AlarmClockClothing(
                this.module.name, this.DisplayName, this.name, "Item_" + this.Icon.replace(".png", "") + string0, string1, this.SpriteName
            );
            AlarmClockClothing alarmClockClothing = (AlarmClockClothing)object;
            alarmClockClothing.setTemperature(this.Temperature);
            alarmClockClothing.setInsulation(this.insulation);
            alarmClockClothing.setConditionLowerChance(this.ConditionLowerChance);
            alarmClockClothing.setStompPower(this.stompPower);
            alarmClockClothing.setRunSpeedModifier(this.runSpeedModifier);
            alarmClockClothing.setCombatSpeedModifier(this.combatSpeedModifier);
            alarmClockClothing.setRemoveOnBroken(this.removeOnBroken);
            alarmClockClothing.setCanHaveHoles(this.canHaveHoles);
            alarmClockClothing.setWeightWet(this.WeightWet);
            alarmClockClothing.setBiteDefense(this.biteDefense);
            alarmClockClothing.setBulletDefense(this.bulletDefense);
            alarmClockClothing.setNeckProtectionModifier(this.neckProtectionModifier);
            alarmClockClothing.setScratchDefense(this.scratchDefense);
            alarmClockClothing.setChanceToFall(this.chanceToFall);
            alarmClockClothing.setWindresistance(this.windresist);
            alarmClockClothing.setWaterResistance(this.waterresist);
            alarmClockClothing.setAlarmSound(this.AlarmSound);
            alarmClockClothing.setSoundRadius(this.SoundRadius);
        } else if (this.type == Item.Type.Weapon) {
            object = new HandWeapon(this.module.name, this.DisplayName, this.name, this);
            HandWeapon handWeapon = (HandWeapon)object;
            handWeapon.setMultipleHitConditionAffected(this.MultipleHitConditionAffected);
            handWeapon.setConditionLowerChance(this.ConditionLowerChance);
            handWeapon.SplatSize = this.SplatSize;
            handWeapon.aimingMod = this.AimingMod;
            handWeapon.setMinDamage(this.MinDamage);
            handWeapon.setMaxDamage(this.MaxDamage);
            handWeapon.setBaseSpeed(this.baseSpeed);
            handWeapon.setPhysicsObject(this.PhysicsObject);
            handWeapon.setOtherHandRequire(this.OtherHandRequire);
            handWeapon.setOtherHandUse(this.OtherHandUse);
            handWeapon.setMaxRange(this.MaxRange);
            handWeapon.setMinRange(this.MinRange);
            handWeapon.setShareEndurance(this.ShareEndurance);
            handWeapon.setKnockdownMod(this.KnockdownMod);
            handWeapon.bIsAimedFirearm = this.IsAimedFirearm;
            handWeapon.RunAnim = this.RunAnim;
            handWeapon.IdleAnim = this.IdleAnim;
            handWeapon.HitAngleMod = (float)Math.toRadians((double)this.HitAngleMod);
            handWeapon.bIsAimedHandWeapon = this.IsAimedHandWeapon;
            handWeapon.setCantAttackWithLowestEndurance(this.CantAttackWithLowestEndurance);
            handWeapon.setAlwaysKnockdown(this.AlwaysKnockdown);
            handWeapon.setEnduranceMod(this.EnduranceMod);
            handWeapon.setUseSelf(this.UseSelf);
            handWeapon.setMaxHitCount(this.MaxHitCount);
            handWeapon.setMinimumSwingTime(this.MinimumSwingTime);
            handWeapon.setSwingTime(this.SwingTime);
            handWeapon.setDoSwingBeforeImpact(this.SwingAmountBeforeImpact);
            handWeapon.setMinAngle(this.MinAngle);
            handWeapon.setDoorDamage(this.DoorDamage);
            handWeapon.setTreeDamage(this.treeDamage);
            handWeapon.setDoorHitSound(this.DoorHitSound);
            handWeapon.setHitFloorSound(this.hitFloorSound);
            handWeapon.setZombieHitSound(this.HitSound);
            handWeapon.setPushBackMod(this.PushBackMod);
            handWeapon.setWeight(this.WeaponWeight);
            handWeapon.setImpactSound(this.ImpactSound);
            handWeapon.setSplatNumber(this.SplatNumber);
            handWeapon.setKnockBackOnNoDeath(this.KnockBackOnNoDeath);
            handWeapon.setSplatBloodOnNoDeath(this.SplatBloodOnNoDeath);
            handWeapon.setSwingSound(this.SwingSound);
            handWeapon.setBulletOutSound(this.bulletOutSound);
            handWeapon.setShellFallSound(this.ShellFallSound);
            handWeapon.setAngleFalloff(this.AngleFalloff);
            handWeapon.setSoundVolume(this.SoundVolume);
            handWeapon.setSoundRadius(this.SoundRadius);
            handWeapon.setToHitModifier(this.ToHitModifier);
            handWeapon.setOtherBoost(this.NPCSoundBoost);
            handWeapon.setRanged(this.Ranged);
            handWeapon.setRangeFalloff(this.RangeFalloff);
            handWeapon.setUseEndurance(this.UseEndurance);
            handWeapon.setCriticalChance(this.CriticalChance);
            handWeapon.setCritDmgMultiplier(this.critDmgMultiplier);
            handWeapon.setShareDamage(this.ShareDamage);
            handWeapon.setCanBarracade(this.CanBarricade);
            handWeapon.setWeaponSprite(this.WeaponSprite);
            handWeapon.setOriginalWeaponSprite(this.WeaponSprite);
            handWeapon.setSubCategory(this.SubCategory);
            handWeapon.setCategories(this.Categories);
            handWeapon.setSoundGain(this.SoundGain);
            handWeapon.setAimingPerkCritModifier(this.AimingPerkCritModifier);
            handWeapon.setAimingPerkRangeModifier(this.AimingPerkRangeModifier);
            handWeapon.setAimingPerkHitChanceModifier(this.AimingPerkHitChanceModifier);
            handWeapon.setHitChance(this.HitChance);
            handWeapon.setRecoilDelay(this.RecoilDelay);
            handWeapon.setAimingPerkMinAngleModifier(this.AimingPerkMinAngleModifier);
            handWeapon.setPiercingBullets(this.PiercingBullets);
            handWeapon.setClipSize(this.ClipSize);
            handWeapon.setReloadTime(this.reloadTime);
            handWeapon.setAimingTime(this.aimingTime);
            handWeapon.setTriggerExplosionTimer(this.triggerExplosionTimer);
            handWeapon.setSensorRange(this.sensorRange);
            handWeapon.setWeaponLength(this.WeaponLength);
            handWeapon.setPlacedSprite(this.PlacedSprite);
            handWeapon.setExplosionTimer(this.explosionTimer);
            handWeapon.setCanBePlaced(this.canBePlaced);
            handWeapon.setCanBeReused(this.canBeReused);
            handWeapon.setExplosionRange(this.explosionRange);
            handWeapon.setExplosionPower(this.explosionPower);
            handWeapon.setFireRange(this.fireRange);
            handWeapon.setFirePower(this.firePower);
            handWeapon.setSmokeRange(this.smokeRange);
            handWeapon.setNoiseRange(this.noiseRange);
            handWeapon.setExtraDamage(this.extraDamage);
            handWeapon.setAmmoBox(this.ammoBox);
            handWeapon.setRackSound(this.rackSound);
            handWeapon.setClickSound(this.clickSound);
            handWeapon.setMagazineType(this.magazineType);
            handWeapon.setWeaponReloadType(this.weaponReloadType);
            handWeapon.setInsertAllBulletsReload(this.insertAllBulletsReload);
            handWeapon.setRackAfterShoot(this.rackAfterShoot);
            handWeapon.setJamGunChance(this.jamGunChance);
            handWeapon.setModelWeaponPart(this.modelWeaponPart);
            handWeapon.setHaveChamber(this.haveChamber);
            handWeapon.setDamageCategory(this.damageCategory);
            handWeapon.setDamageMakeHole(this.damageMakeHole);
            handWeapon.setFireMode(this.fireMode);
            handWeapon.setFireModePossibilities(this.fireModePossibilities);
        } else if (this.type == Item.Type.Normal) {
            object = new ComboItem(this.module.name, this.DisplayName, this.name, this);
        } else if (this.type == Item.Type.Clothing) {
            String string2 = "";
            String string3 = null;
            if (!this.PaletteChoices.isEmpty() || param != null) {
                int int1 = Rand.Next(this.PaletteChoices.size());
                string3 = (String)this.PaletteChoices.get(int1);
                if (param != null) {
                    string3 = param;
                }

                string2 = "_" + string3.replace(this.PalettesStart, "");
            }

            object = new Clothing(this.module.name, this.DisplayName, this.name, "Item_" + this.Icon.replace(".png", "") + string2, string3, this.SpriteName);
            Clothing clothing = (Clothing)object;
            clothing.setTemperature(this.Temperature);
            clothing.setInsulation(this.insulation);
            clothing.setConditionLowerChance(this.ConditionLowerChance);
            clothing.setStompPower(this.stompPower);
            clothing.setRunSpeedModifier(this.runSpeedModifier);
            clothing.setCombatSpeedModifier(this.combatSpeedModifier);
            clothing.setRemoveOnBroken(this.removeOnBroken);
            clothing.setCanHaveHoles(this.canHaveHoles);
            clothing.setWeightWet(this.WeightWet);
            clothing.setBiteDefense(this.biteDefense);
            clothing.setBulletDefense(this.bulletDefense);
            clothing.setNeckProtectionModifier(this.neckProtectionModifier);
            clothing.setScratchDefense(this.scratchDefense);
            clothing.setChanceToFall(this.chanceToFall);
            clothing.setWindresistance(this.windresist);
            clothing.setWaterResistance(this.waterresist);
        } else if (this.type == Item.Type.Drainable) {
            object = new DrainableComboItem(this.module.name, this.DisplayName, this.name, this);
            DrainableComboItem drainableComboItem = (DrainableComboItem)object;
            drainableComboItem.setUseWhileEquiped(this.UseWhileEquipped);
            drainableComboItem.setUseWhileUnequiped(this.UseWhileUnequipped);
            drainableComboItem.setTicksPerEquipUse(this.TicksPerEquipUse);
            drainableComboItem.setUseDelta(this.UseDelta);
            drainableComboItem.setReplaceOnDeplete(this.ReplaceOnDeplete);
            drainableComboItem.setIsCookable(this.IsCookable);
            drainableComboItem.setReplaceOnCooked(this.ReplaceOnCooked);
            drainableComboItem.setMinutesToCook((float)this.MinutesToCook);
            drainableComboItem.setOnCooked(this.OnCooked);
            drainableComboItem.setRainFactor(this.rainFactor);
            drainableComboItem.setCanConsolidate(!this.cantBeConsolided);
            drainableComboItem.setWeightEmpty(this.WeightEmpty);
        } else if (this.type == Item.Type.Radio) {
            object = new Radio(this.module.name, this.DisplayName, this.name, "Item_" + this.Icon);
            Radio radio = (Radio)object;
            DeviceData deviceData = radio.getDeviceData();
            if (deviceData != null) {
                if (this.DisplayName != null) {
                    deviceData.setDeviceName(this.DisplayName);
                }

                deviceData.setIsTwoWay(this.twoWay);
                deviceData.setTransmitRange(this.transmitRange);
                deviceData.setMicRange(this.micRange);
                deviceData.setBaseVolumeRange(this.baseVolumeRange);
                deviceData.setIsPortable(this.isPortable);
                deviceData.setIsTelevision(this.isTelevision);
                deviceData.setMinChannelRange(this.minChannel);
                deviceData.setMaxChannelRange(this.maxChannel);
                deviceData.setIsBatteryPowered(this.usesBattery);
                deviceData.setIsHighTier(this.isHighTier);
                deviceData.setUseDelta(this.UseDelta);
                deviceData.setMediaType(this.acceptMediaType);
                deviceData.setNoTransmit(this.noTransmit);
                deviceData.generatePresets();
                deviceData.setRandomChannel();
            }

            if (!StringUtils.isNullOrWhitespace(this.worldObjectSprite) && !radio.ReadFromWorldSprite(this.worldObjectSprite)) {
                DebugLog.log("Item -> Radio item = " + (this.moduleDotType != null ? this.moduleDotType : "unknown"));
            }
        } else if (this.type == Item.Type.Moveable) {
            object = new Moveable(this.module.name, this.DisplayName, this.name, this);
            Moveable moveable = (Moveable)object;
            moveable.ReadFromWorldSprite(this.worldObjectSprite);
            this.ActualWeight = moveable.getActualWeight();
        } else if (this.type == Item.Type.Map) {
            MapItem mapItem = new MapItem(this.module.name, this.DisplayName, this.name, this);
            if (StringUtils.isNullOrWhitespace(this.map)) {
                mapItem.setMapID(MapDefinitions.getInstance().pickRandom());
            } else {
                mapItem.setMapID(this.map);
            }

            object = mapItem;
        }

        if (this.colorRed < 255 || this.colorGreen < 255 || this.colorBlue < 255) {
            ((InventoryItem)object).setColor(new Color((float)this.colorRed / 255.0F, (float)this.colorGreen / 255.0F, (float)this.colorBlue / 255.0F));
        }

        ((InventoryItem)object).setAlcoholPower(this.alcoholPower);
        ((InventoryItem)object).setConditionMax(this.ConditionMax);
        ((InventoryItem)object).setCondition(this.ConditionMax);
        ((InventoryItem)object).setCanBeActivated(this.ActivatedItem);
        ((InventoryItem)object).setLightStrength(this.LightStrength);
        ((InventoryItem)object).setTorchCone(this.TorchCone);
        ((InventoryItem)object).setLightDistance(this.LightDistance);
        ((InventoryItem)object).setActualWeight(this.ActualWeight);
        ((InventoryItem)object).setWeight(this.ActualWeight);
        ((InventoryItem)object).setUses(this.Count);
        ((InventoryItem)object).setScriptItem(this);
        ((InventoryItem)object).setBoredomChange(this.BoredomChange);
        ((InventoryItem)object).setStressChange(this.StressChange / 100.0F);
        ((InventoryItem)object).setUnhappyChange(this.UnhappyChange);
        ((InventoryItem)object).setReplaceOnUseOn(this.ReplaceOnUseOn);
        ((InventoryItem)object).setRequireInHandOrInventory(this.RequireInHandOrInventory);
        ((InventoryItem)object).setAttachmentsProvided(this.attachmentsProvided);
        ((InventoryItem)object).setAttachmentReplacement(this.attachmentReplacement);
        ((InventoryItem)object).setIsWaterSource(this.IsWaterSource);
        ((InventoryItem)object).CanStoreWater = this.CanStoreWater;
        ((InventoryItem)object).CanStack = this.CanStack;
        ((InventoryItem)object).copyModData(this.DefaultModData);
        ((InventoryItem)object).setCount(this.Count);
        ((InventoryItem)object).setFatigueChange(this.FatigueChange / 100.0F);
        ((InventoryItem)object).setTooltip(this.Tooltip);
        ((InventoryItem)object).setDisplayCategory(this.DisplayCategory);
        ((InventoryItem)object).setAlcoholic(this.Alcoholic);
        ((InventoryItem)object).RequiresEquippedBothHands = this.RequiresEquippedBothHands;
        ((InventoryItem)object).setBreakSound(this.breakSound);
        ((InventoryItem)object).setReplaceOnUse(this.ReplaceOnUse);
        ((InventoryItem)object).setBandagePower(this.bandagePower);
        ((InventoryItem)object).setReduceInfectionPower(this.ReduceInfectionPower);
        ((InventoryItem)object).setCanBeRemote(this.canBeRemote);
        ((InventoryItem)object).setRemoteController(this.remoteController);
        ((InventoryItem)object).setRemoteRange(this.remoteRange);
        ((InventoryItem)object).setCountDownSound(this.countDownSound);
        ((InventoryItem)object).setExplosionSound(this.explosionSound);
        ((InventoryItem)object).setColorRed((float)this.colorRed / 255.0F);
        ((InventoryItem)object).setColorGreen((float)this.colorGreen / 255.0F);
        ((InventoryItem)object).setColorBlue((float)this.colorBlue / 255.0F);
        ((InventoryItem)object).setEvolvedRecipeName(this.evolvedRecipeName);
        ((InventoryItem)object).setMetalValue(this.metalValue);
        ((InventoryItem)object).setWet(this.isWet);
        ((InventoryItem)object).setWetCooldown(this.wetCooldown);
        ((InventoryItem)object).setItemWhenDry(this.itemWhenDry);
        ((InventoryItem)object).keepOnDeplete = this.keepOnDeplete;
        ((InventoryItem)object).setItemCapacity((float)this.itemCapacity);
        ((InventoryItem)object).setMaxCapacity(this.maxCapacity);
        ((InventoryItem)object).setBrakeForce(this.brakeForce);
        ((InventoryItem)object).setChanceToSpawnDamaged(this.chanceToSpawnDamaged);
        ((InventoryItem)object).setConditionLowerNormal(this.conditionLowerNormal);
        ((InventoryItem)object).setConditionLowerOffroad(this.conditionLowerOffroad);
        ((InventoryItem)object).setWheelFriction(this.wheelFriction);
        ((InventoryItem)object).setSuspensionCompression(this.suspensionCompression);
        ((InventoryItem)object).setEngineLoudness(this.engineLoudness);
        ((InventoryItem)object).setSuspensionDamping(this.suspensionDamping);
        if (this.CustomContextMenu != null) {
            ((InventoryItem)object).setCustomMenuOption(Translator.getText("ContextMenu_" + this.CustomContextMenu));
        }

        if (this.IconsForTexture != null && !this.IconsForTexture.isEmpty()) {
            ((InventoryItem)object).setIconsForTexture(this.IconsForTexture);
        }

        ((InventoryItem)object).setBloodClothingType(this.bloodClothingType);
        ((InventoryItem)object).CloseKillMove = this.CloseKillMove;
        ((InventoryItem)object).setAmmoType(this.AmmoType);
        ((InventoryItem)object).setMaxAmmo(this.maxAmmo);
        ((InventoryItem)object).setGunType(this.GunType);
        ((InventoryItem)object).setAttachmentType(this.attachmentType);
        long _long = OutfitRNG.getSeed();
        OutfitRNG.setSeed((long)Rand.Next(Integer.MAX_VALUE));
        ((InventoryItem)object).synchWithVisual();
        OutfitRNG.setSeed(_long);
        ((InventoryItem)object).setRegistry_id(this);
        Thread thread = Thread.currentThread();
        if ((thread == zombie.GameWindow.GameThread || thread == GameLoadingState.loader || thread == GameServer.MainThread)
            && !((InventoryItem)object).isInitialised()) {
            ((InventoryItem)object).initialiseItem();
        }

        return (InventoryItem)object;
    }

    public void DoParam(String str) {
        if (str.trim().length() != 0) {
            try {
                String[] string0 = str.split("=");
                String string1 = string0[0].trim();
                String string2 = string0[1].trim();
                if (string1.trim().equalsIgnoreCase("BodyLocation")) {
                    this.BodyLocation = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("Palettes")) {
                    String[] string3 = string2.split("/");

                    for (int int0 = 0; int0 < string3.length; int0++) {
                        this.PaletteChoices.add(string3[int0].trim());
                    }
                } else if (string1.trim().equalsIgnoreCase("HitSound")) {
                    this.HitSound = string2.trim();
                    if (this.HitSound.equals("null")) {
                        this.HitSound = null;
                    }
                } else if (string1.trim().equalsIgnoreCase("HitFloorSound")) {
                    this.hitFloorSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("PalettesStart")) {
                    this.PalettesStart = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("DisplayName")) {
                    this.DisplayName = Translator.getDisplayItemName(string2.trim());
                    this.DisplayName = Translator.getItemNameFromFullType(this.getFullName());
                } else if (string1.trim().equalsIgnoreCase("MetalValue")) {
                    this.metalValue = new Float(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("SpriteName")) {
                    this.SpriteName = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("Type")) {
                    this.type = Item.Type.valueOf(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("SplatSize")) {
                    this.SplatSize = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("CanStoreWater")) {
                    this.CanStoreWater = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("IsWaterSource")) {
                    this.IsWaterSource = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("Poison")) {
                    this.Poison = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("FoodType")) {
                    this.FoodType = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("PoisonDetectionLevel")) {
                    this.PoisonDetectionLevel = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("PoisonPower")) {
                    this.PoisonPower = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("UseForPoison")) {
                    this.UseForPoison = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("SwingAnim")) {
                    this.SwingAnim = string2;
                } else if (string1.trim().equalsIgnoreCase("Icon")) {
                    this.Icon = string2;
                    this.ItemName = "Item_" + this.Icon;
                    this.NormalTexture = Texture.trygetTexture(this.ItemName);
                    if (this.NormalTexture == null) {
                        this.NormalTexture = Texture.getSharedTexture("media/inventory/Question_On.png");
                    }

                    this.WorldTextureName = this.ItemName.replace("Item_", "media/inventory/world/WItem_");
                    this.WorldTextureName = this.WorldTextureName + ".png";
                    this.WorldTexture = Texture.getSharedTexture(this.WorldTextureName);
                    if (this.type == Item.Type.Food) {
                        Texture texture0 = Texture.trygetTexture(this.ItemName + "Rotten");
                        String string4 = this.WorldTextureName.replace(".png", "Rotten.png");
                        if (texture0 == null) {
                            texture0 = Texture.trygetTexture(this.ItemName + "Spoiled");
                            string4 = string4.replace("Rotten.png", "Spoiled.png");
                        }

                        this.SpecialWorldTextureNames.add(string4);
                        this.SpecialTextures.add(texture0);
                        this.SpecialTextures.add(Texture.trygetTexture(this.ItemName + "Cooked"));
                        this.SpecialWorldTextureNames.add(this.WorldTextureName.replace(".png", "Cooked.png"));
                        Texture texture1 = Texture.trygetTexture(this.ItemName + "Overdone");
                        String string5 = this.WorldTextureName.replace(".png", "Overdone.png");
                        if (texture1 == null) {
                            texture1 = Texture.trygetTexture(this.ItemName + "Burnt");
                            string5 = string5.replace("Overdone.png", "Burnt.png");
                        }

                        this.SpecialTextures.add(texture1);
                        this.SpecialWorldTextureNames.add(string5);
                    }
                } else if (string1.trim().equalsIgnoreCase("UseWorldItem")) {
                    this.UseWorldItem = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("Medical")) {
                    this.Medical = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("CannedFood")) {
                    this.CannedFood = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("MechanicsItem")) {
                    this.MechanicsItem = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("SurvivalGear")) {
                    this.SurvivalGear = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("ScaleWorldIcon")) {
                    this.ScaleWorldIcon = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("HairDye")) {
                    this.hairDye = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("DoorHitSound")) {
                    this.DoorHitSound = string2;
                } else if (string1.trim().equalsIgnoreCase("Weight")) {
                    this.ActualWeight = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("WeightWet")) {
                    this.WeightWet = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("WeightEmpty")) {
                    this.WeightEmpty = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("HungerChange")) {
                    this.HungerChange = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("ThirstChange")) {
                    this.ThirstChange = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("FatigueChange")) {
                    this.FatigueChange = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("EnduranceChange")) {
                    this.EnduranceChange = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("CriticalChance")) {
                    this.CriticalChance = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("critDmgMultiplier")) {
                    this.critDmgMultiplier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("DaysFresh")) {
                    this.DaysFresh = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("DaysTotallyRotten")) {
                    this.DaysTotallyRotten = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("IsCookable")) {
                    this.IsCookable = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("CookingSound")) {
                    this.CookingSound = string2;
                } else if (string1.trim().equalsIgnoreCase("MinutesToCook")) {
                    this.MinutesToCook = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("MinutesToBurn")) {
                    this.MinutesToBurn = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("BoredomChange")) {
                    this.BoredomChange = (float)Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("StressChange")) {
                    this.StressChange = (float)Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("UnhappyChange")) {
                    this.UnhappyChange = (float)Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("RemoveUnhappinessWhenCooked")) {
                    this.RemoveUnhappinessWhenCooked = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("ReplaceOnDeplete")) {
                    this.ReplaceOnDeplete = string2;
                } else if (string1.trim().equalsIgnoreCase("ReplaceOnUseOn")) {
                    this.ReplaceOnUseOn = string2;
                    if (string2.contains("-")) {
                        String[] string6 = string2.split("-");
                        String string7 = string6[0].trim();
                        String string8 = string6[1].trim();
                        if (!string7.isEmpty() && !string8.isEmpty()) {
                            if (this.ReplaceTypesMap == null) {
                                this.ReplaceTypesMap = new HashMap();
                            }

                            this.ReplaceTypesMap.put(string7, string8);
                        }
                    }
                } else if (string1.trim().equalsIgnoreCase("ReplaceTypes")) {
                    this.ReplaceTypes = string2;
                    String[] string9 = string2.split(";");

                    for (String string10 : string9) {
                        String[] string11 = string10.trim().split("\\s+");
                        if (string11.length == 2) {
                            String string12 = string11[0].trim();
                            String string13 = string11[1].trim();
                            if (!string12.isEmpty() && !string13.isEmpty()) {
                                if (this.ReplaceTypesMap == null) {
                                    this.ReplaceTypesMap = new HashMap();
                                }

                                this.ReplaceTypesMap.put(string12, string13);
                            }
                        }
                    }
                } else if (string1.trim().equalsIgnoreCase("Ranged")) {
                    this.Ranged = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("UseSelf")) {
                    this.UseSelf = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("OtherHandUse")) {
                    this.OtherHandUse = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("DangerousUncooked")) {
                    this.DangerousUncooked = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("MaxRange")) {
                    this.MaxRange = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("MinRange")) {
                    this.MinRange = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("MinAngle")) {
                    this.MinAngle = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("MaxDamage")) {
                    this.MaxDamage = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("BaseSpeed")) {
                    this.baseSpeed = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("stompPower")) {
                    this.stompPower = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("combatSpeedModifier")) {
                    this.combatSpeedModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("runSpeedModifier")) {
                    this.runSpeedModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("clothingItemExtra")) {
                    this.clothingItemExtra = new ArrayList();
                    String[] string14 = string2.split(";");

                    for (int int1 = 0; int1 < string14.length; int1++) {
                        this.clothingItemExtra.add(string14[int1]);
                    }
                } else if (string1.trim().equalsIgnoreCase("clothingExtraSubmenu")) {
                    this.clothingExtraSubmenu = string2;
                } else if (string1.trim().equalsIgnoreCase("removeOnBroken")) {
                    this.removeOnBroken = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("canHaveHoles")) {
                    this.canHaveHoles = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("Cosmetic")) {
                    this.cosmetic = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("ammoBox")) {
                    this.ammoBox = string2;
                } else if (string1.trim().equalsIgnoreCase("InsertAmmoStartSound")) {
                    this.insertAmmoStartSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("InsertAmmoSound")) {
                    this.insertAmmoSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("InsertAmmoStopSound")) {
                    this.insertAmmoStopSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("EjectAmmoStartSound")) {
                    this.ejectAmmoStartSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("EjectAmmoSound")) {
                    this.ejectAmmoSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("EjectAmmoStopSound")) {
                    this.ejectAmmoStopSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("rackSound")) {
                    this.rackSound = string2;
                } else if (string1.trim().equalsIgnoreCase("clickSound")) {
                    this.clickSound = string2;
                } else if (string1.equalsIgnoreCase("BringToBearSound")) {
                    this.bringToBearSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.equalsIgnoreCase("EquipSound")) {
                    this.equipSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.equalsIgnoreCase("UnequipSound")) {
                    this.unequipSound = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("magazineType")) {
                    this.magazineType = string2;
                } else if (string1.trim().equalsIgnoreCase("jamGunChance")) {
                    this.jamGunChance = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("modelWeaponPart")) {
                    if (this.modelWeaponPart == null) {
                        this.modelWeaponPart = new ArrayList();
                    }

                    String[] string15 = string2.split("\\s+");
                    if (string15.length >= 2 && string15.length <= 4) {
                        ModelWeaponPart modelWeaponPart0 = null;

                        for (int int2 = 0; int2 < this.modelWeaponPart.size(); int2++) {
                            ModelWeaponPart modelWeaponPart1 = (ModelWeaponPart)this.modelWeaponPart.get(int2);
                            if (modelWeaponPart1.partType.equals(string15[0])) {
                                modelWeaponPart0 = modelWeaponPart1;
                                break;
                            }
                        }

                        if (modelWeaponPart0 == null) {
                            modelWeaponPart0 = new ModelWeaponPart();
                        }

                        modelWeaponPart0.partType = string15[0];
                        modelWeaponPart0.modelName = string15[1];
                        modelWeaponPart0.attachmentNameSelf = string15.length > 2 ? string15[2] : null;
                        modelWeaponPart0.attachmentParent = string15.length > 3 ? string15[3] : null;
                        if (!modelWeaponPart0.partType.contains(".")) {
                            modelWeaponPart0.partType = this.module.name + "." + modelWeaponPart0.partType;
                        }

                        if (!modelWeaponPart0.modelName.contains(".")) {
                            modelWeaponPart0.modelName = this.module.name + "." + modelWeaponPart0.modelName;
                        }

                        if ("none".equalsIgnoreCase(modelWeaponPart0.attachmentNameSelf)) {
                            modelWeaponPart0.attachmentNameSelf = null;
                        }

                        if ("none".equalsIgnoreCase(modelWeaponPart0.attachmentParent)) {
                            modelWeaponPart0.attachmentParent = null;
                        }

                        this.modelWeaponPart.add(modelWeaponPart0);
                    }
                } else if (string1.trim().equalsIgnoreCase("rackAfterShoot")) {
                    this.rackAfterShoot = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("haveChamber")) {
                    this.haveChamber = Boolean.parseBoolean(string2);
                } else if (string1.equalsIgnoreCase("ManuallyRemoveSpentRounds")) {
                    this.manuallyRemoveSpentRounds = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("biteDefense")) {
                    this.biteDefense = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("bulletDefense")) {
                    this.bulletDefense = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("neckProtectionModifier")) {
                    this.neckProtectionModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("damageCategory")) {
                    this.damageCategory = string2;
                } else if (string1.trim().equalsIgnoreCase("fireMode")) {
                    this.fireMode = string2;
                } else if (string1.trim().equalsIgnoreCase("damageMakeHole")) {
                    this.damageMakeHole = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("equippedNoSprint")) {
                    this.equippedNoSprint = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("scratchDefense")) {
                    this.scratchDefense = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("weaponReloadType")) {
                    this.weaponReloadType = string2;
                } else if (string1.trim().equalsIgnoreCase("insertAllBulletsReload")) {
                    this.insertAllBulletsReload = Boolean.parseBoolean(string2);
                } else if (string1.trim().equalsIgnoreCase("clothingItemExtraOption")) {
                    this.clothingItemExtraOption = new ArrayList();
                    String[] string16 = string2.split(";");

                    for (int int3 = 0; int3 < string16.length; int3++) {
                        this.clothingItemExtraOption.add(string16[int3]);
                    }
                } else if (string1.trim().equalsIgnoreCase("ConditionLowerChanceOneIn")) {
                    this.ConditionLowerChance = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("MultipleHitConditionAffected")) {
                    this.MultipleHitConditionAffected = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("CanBandage")) {
                    this.CanBandage = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("ConditionMax")) {
                    this.ConditionMax = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("SoundGain")) {
                    this.SoundGain = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("MinDamage")) {
                    this.MinDamage = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("MinimumSwingTime")) {
                    this.MinimumSwingTime = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("SwingSound")) {
                    this.SwingSound = string2;
                } else if (string1.trim().equalsIgnoreCase("ReplaceOnUse")) {
                    this.ReplaceOnUse = string2;
                } else if (string1.trim().equalsIgnoreCase("WeaponSprite")) {
                    this.WeaponSprite = string2;
                } else if (string1.trim().equalsIgnoreCase("AimingPerkCritModifier")) {
                    this.AimingPerkCritModifier = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("AimingPerkRangeModifier")) {
                    this.AimingPerkRangeModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("AimingPerkHitChanceModifier")) {
                    this.AimingPerkHitChanceModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("AngleModifier")) {
                    this.angleModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("WeightModifier")) {
                    this.weightModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("AimingPerkMinAngleModifier")) {
                    this.AimingPerkMinAngleModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("HitChance")) {
                    this.HitChance = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("RecoilDelay")) {
                    this.RecoilDelay = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("StopPower")) {
                    this.stopPower = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("PiercingBullets")) {
                    this.PiercingBullets = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("AngleFalloff")) {
                    this.AngleFalloff = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("SoundVolume")) {
                    this.SoundVolume = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("ToHitModifier")) {
                    this.ToHitModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("SoundRadius")) {
                    this.SoundRadius = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("Categories")) {
                    String[] string17 = string2.split(";");

                    for (int int4 = 0; int4 < string17.length; int4++) {
                        this.Categories.add(string17[int4].trim());
                    }
                } else if (string1.trim().equalsIgnoreCase("Tags")) {
                    String[] string18 = string2.split(";");

                    for (int int5 = 0; int5 < string18.length; int5++) {
                        this.Tags.add(string18[int5].trim());
                    }
                } else if (string1.trim().equalsIgnoreCase("OtherCharacterVolumeBoost")) {
                    this.OtherCharacterVolumeBoost = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("ImpactSound")) {
                    this.ImpactSound = string2;
                    if (this.ImpactSound.equals("null")) {
                        this.ImpactSound = null;
                    }
                } else if (string1.trim().equalsIgnoreCase("SwingTime")) {
                    this.SwingTime = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("KnockBackOnNoDeath")) {
                    this.KnockBackOnNoDeath = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("Alcoholic")) {
                    this.Alcoholic = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("SplatBloodOnNoDeath")) {
                    this.SplatBloodOnNoDeath = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("SwingAmountBeforeImpact")) {
                    this.SwingAmountBeforeImpact = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("AmmoType")) {
                    this.AmmoType = string2;
                } else if (string1.trim().equalsIgnoreCase("maxAmmo")) {
                    this.maxAmmo = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("GunType")) {
                    this.GunType = string2;
                } else if (string1.trim().equalsIgnoreCase("HitAngleMod")) {
                    this.HitAngleMod = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("OtherHandRequire")) {
                    this.OtherHandRequire = string2;
                } else if (string1.trim().equalsIgnoreCase("AlwaysWelcomeGift")) {
                    this.AlwaysWelcomeGift = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("CantAttackWithLowestEndurance")) {
                    this.CantAttackWithLowestEndurance = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("EnduranceMod")) {
                    this.EnduranceMod = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("KnockdownMod")) {
                    this.KnockdownMod = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("DoorDamage")) {
                    this.DoorDamage = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("MaxHitCount")) {
                    this.MaxHitCount = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("PhysicsObject")) {
                    this.PhysicsObject = string2;
                } else if (string1.trim().equalsIgnoreCase("Count")) {
                    this.Count = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("SwingAnim")) {
                    this.SwingAnim = string2;
                } else if (string1.trim().equalsIgnoreCase("WeaponWeight")) {
                    this.WeaponWeight = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("IdleAnim")) {
                    this.IdleAnim = string2;
                } else if (string1.trim().equalsIgnoreCase("RunAnim")) {
                    this.RunAnim = string2;
                } else if (string1.trim().equalsIgnoreCase("RequireInHandOrInventory")) {
                    this.RequireInHandOrInventory = new ArrayList(Arrays.asList(string2.split("/")));
                } else if (string1.trim().equalsIgnoreCase("fireModePossibilities")) {
                    this.fireModePossibilities = new ArrayList(Arrays.asList(string2.split("/")));
                } else if (string1.trim().equalsIgnoreCase("attachmentsProvided")) {
                    this.attachmentsProvided = new ArrayList(Arrays.asList(string2.split(";")));
                } else if (string1.trim().equalsIgnoreCase("attachmentReplacement")) {
                    this.attachmentReplacement = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("PushBackMod")) {
                    this.PushBackMod = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("NPCSoundBoost")) {
                    this.NPCSoundBoost = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("SplatNumber")) {
                    this.SplatNumber = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("RangeFalloff")) {
                    this.RangeFalloff = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("UseEndurance")) {
                    this.UseEndurance = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("ShareDamage")) {
                    this.ShareDamage = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("ShareEndurance")) {
                    this.ShareEndurance = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("AlwaysKnockdown")) {
                    this.AlwaysKnockdown = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("IsAimedFirearm")) {
                    this.IsAimedFirearm = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("bulletOutSound")) {
                    this.bulletOutSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("ShellFallSound")) {
                    this.ShellFallSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("SoundMap")) {
                    String[] string19 = string2.split("\\s+");
                    if (string19.length == 2 && !string19[0].trim().isEmpty()) {
                        if (this.SoundMap == null) {
                            this.SoundMap = new HashMap();
                        }

                        this.SoundMap.put(string19[0].trim(), string19[1].trim());
                    }
                } else if (string1.trim().equalsIgnoreCase("IsAimedHandWeapon")) {
                    this.IsAimedHandWeapon = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("AimingMod")) {
                    this.AimingMod = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("ProjectileCount")) {
                    this.ProjectileCount = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("CanStack")) {
                    this.IsAimedFirearm = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("HerbalistType")) {
                    this.HerbalistType = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("CanBarricade")) {
                    this.CanBarricade = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("UseWhileEquipped")) {
                    this.UseWhileEquipped = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("UseWhileUnequipped")) {
                    this.UseWhileUnequipped = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("TicksPerEquipUse")) {
                    this.TicksPerEquipUse = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("DisappearOnUse")) {
                    this.DisappearOnUse = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("Temperature")) {
                    this.Temperature = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("Insulation")) {
                    this.insulation = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("WindResistance")) {
                    this.windresist = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("WaterResistance")) {
                    this.waterresist = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("CloseKillMove")) {
                    this.CloseKillMove = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("UseDelta")) {
                    this.UseDelta = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("RainFactor")) {
                    this.rainFactor = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("TorchDot")) {
                    this.torchDot = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("NumberOfPages")) {
                    this.NumberOfPages = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("SkillTrained")) {
                    this.SkillTrained = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("LvlSkillTrained")) {
                    this.LvlSkillTrained = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("NumLevelsTrained")) {
                    this.NumLevelsTrained = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("Capacity")) {
                    this.Capacity = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("MaxCapacity")) {
                    this.maxCapacity = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ItemCapacity")) {
                    this.itemCapacity = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ConditionAffectsCapacity")) {
                    this.ConditionAffectsCapacity = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("BrakeForce")) {
                    this.brakeForce = (float)Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ChanceToSpawnDamaged")) {
                    this.chanceToSpawnDamaged = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("WeaponLength")) {
                    this.WeaponLength = new Float(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ClipSize")) {
                    this.ClipSize = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ReloadTime")) {
                    this.reloadTime = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("AimingTime")) {
                    this.aimingTime = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("AimingTimeModifier")) {
                    this.aimingTimeModifier = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ReloadTimeModifier")) {
                    this.reloadTimeModifier = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("HitChanceModifier")) {
                    this.hitChanceModifier = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("WeightReduction")) {
                    this.WeightReduction = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("CanBeEquipped")) {
                    this.CanBeEquipped = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("SubCategory")) {
                    this.SubCategory = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("ActivatedItem")) {
                    this.ActivatedItem = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("ProtectFromRainWhenEquipped")) {
                    this.ProtectFromRainWhenEquipped = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("LightStrength")) {
                    this.LightStrength = new Float(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("TorchCone")) {
                    this.TorchCone = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("LightDistance")) {
                    this.LightDistance = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("TwoHandWeapon")) {
                    this.TwoHandWeapon = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("Tooltip")) {
                    this.Tooltip = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("DisplayCategory")) {
                    this.DisplayCategory = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("BadInMicrowave")) {
                    this.BadInMicrowave = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("GoodHot")) {
                    this.GoodHot = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("BadCold")) {
                    this.BadCold = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("AlarmSound")) {
                    this.AlarmSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("RequiresEquippedBothHands")) {
                    this.RequiresEquippedBothHands = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("ReplaceOnCooked")) {
                    this.ReplaceOnCooked = Arrays.asList(string2.trim().split(";"));
                } else if (string1.trim().equalsIgnoreCase("CustomContextMenu")) {
                    this.CustomContextMenu = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("Trap")) {
                    this.Trap = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("Wet")) {
                    this.isWet = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("WetCooldown")) {
                    this.wetCooldown = Float.parseFloat(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ItemWhenDry")) {
                    this.itemWhenDry = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("FishingLure")) {
                    this.FishingLure = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("CanBeWrite")) {
                    this.canBeWrite = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("PageToWrite")) {
                    this.PageToWrite = Integer.parseInt(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("Spice")) {
                    this.Spice = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("RemoveNegativeEffectOnCooked")) {
                    this.RemoveNegativeEffectOnCooked = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("ClipSizeModifier")) {
                    this.clipSizeModifier = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("RecoilDelayModifier")) {
                    this.recoilDelayModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("MaxRangeModifier")) {
                    this.maxRangeModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("MinRangeModifier")) {
                    this.minRangeRangedModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("DamageModifier")) {
                    this.damageModifier = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("Map")) {
                    this.map = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("PutInSound")) {
                    this.PutInSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("PlaceOneSound")) {
                    this.PlaceOneSound = StringUtils.discardNullOrWhitespace(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("PlaceMultipleSound")) {
                    this.PlaceMultipleSound = StringUtils.discardNullOrWhitespace(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("CloseSound")) {
                    this.CloseSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("OpenSound")) {
                    this.OpenSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("BreakSound")) {
                    this.breakSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("TreeDamage")) {
                    this.treeDamage = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("CustomEatSound")) {
                    this.customEatSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("FillFromDispenserSound")) {
                    this.fillFromDispenserSound = StringUtils.discardNullOrWhitespace(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("FillFromTapSound")) {
                    this.fillFromTapSound = StringUtils.discardNullOrWhitespace(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("AlcoholPower")) {
                    this.alcoholPower = Float.parseFloat(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("BandagePower")) {
                    this.bandagePower = Float.parseFloat(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("ReduceInfectionPower")) {
                    this.ReduceInfectionPower = Float.parseFloat(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("OnCooked")) {
                    this.OnCooked = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("OnlyAcceptCategory")) {
                    this.OnlyAcceptCategory = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("AcceptItemFunction")) {
                    this.AcceptItemFunction = StringUtils.discardNullOrWhitespace(string2);
                } else if (string1.trim().equalsIgnoreCase("Padlock")) {
                    this.padlock = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("DigitalPadlock")) {
                    this.digitalPadlock = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("triggerExplosionTimer")) {
                    this.triggerExplosionTimer = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("sensorRange")) {
                    this.sensorRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("remoteRange")) {
                    this.remoteRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("CountDownSound")) {
                    this.countDownSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("explosionSound")) {
                    this.explosionSound = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("PlacedSprite")) {
                    this.PlacedSprite = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("explosionTimer")) {
                    this.explosionTimer = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("explosionRange")) {
                    this.explosionRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("explosionPower")) {
                    this.explosionPower = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("fireRange")) {
                    this.fireRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("firePower")) {
                    this.firePower = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("canBePlaced")) {
                    this.canBePlaced = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("CanBeReused")) {
                    this.canBeReused = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("canBeRemote")) {
                    this.canBeRemote = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("remoteController")) {
                    this.remoteController = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("smokeRange")) {
                    this.smokeRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("noiseRange")) {
                    this.noiseRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("noiseDuration")) {
                    this.noiseDuration = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("extraDamage")) {
                    this.extraDamage = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("TwoWay")) {
                    this.twoWay = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("TransmitRange")) {
                    this.transmitRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("MicRange")) {
                    this.micRange = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("BaseVolumeRange")) {
                    this.baseVolumeRange = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("IsPortable")) {
                    this.isPortable = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("IsTelevision")) {
                    this.isTelevision = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("MinChannel")) {
                    this.minChannel = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("MaxChannel")) {
                    this.maxChannel = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("UsesBattery")) {
                    this.usesBattery = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("IsHighTier")) {
                    this.isHighTier = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("WorldObjectSprite")) {
                    this.worldObjectSprite = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("fluReduction")) {
                    this.fluReduction = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("ReduceFoodSickness")) {
                    this.ReduceFoodSickness = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("painReduction")) {
                    this.painReduction = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("ColorRed")) {
                    this.colorRed = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("ColorGreen")) {
                    this.colorGreen = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("ColorBlue")) {
                    this.colorBlue = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("calories")) {
                    this.calories = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("carbohydrates")) {
                    this.carbohydrates = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("lipids")) {
                    this.lipids = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("proteins")) {
                    this.proteins = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("Packaged")) {
                    this.packaged = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("CantBeFrozen")) {
                    this.cantBeFrozen = string2.trim().equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("EvolvedRecipeName")) {
                    Translator.setDefaultItemEvolvedRecipeName(this.getFullName(), string2);
                    this.evolvedRecipeName = Translator.getItemEvolvedRecipeName(this.getFullName());
                } else if (string1.trim().equalsIgnoreCase("ReplaceOnRotten")) {
                    this.ReplaceOnRotten = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("CantBeConsolided")) {
                    this.cantBeConsolided = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("OnEat")) {
                    this.onEat = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("KeepOnDeplete")) {
                    this.keepOnDeplete = string2.equalsIgnoreCase("true");
                } else if (string1.trim().equalsIgnoreCase("VehicleType")) {
                    this.vehicleType = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("ChanceToFall")) {
                    this.chanceToFall = Integer.parseInt(string2);
                } else if (string1.trim().equalsIgnoreCase("conditionLowerOffroad")) {
                    this.conditionLowerOffroad = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("ConditionLowerStandard")) {
                    this.conditionLowerNormal = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("wheelFriction")) {
                    this.wheelFriction = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("suspensionDamping")) {
                    this.suspensionDamping = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("suspensionCompression")) {
                    this.suspensionCompression = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("engineLoudness")) {
                    this.engineLoudness = Float.parseFloat(string2);
                } else if (string1.trim().equalsIgnoreCase("attachmentType")) {
                    this.attachmentType = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("makeUpType")) {
                    this.makeUpType = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("consolidateOption")) {
                    this.consolidateOption = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("fabricType")) {
                    this.fabricType = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("TeachedRecipes")) {
                    this.teachedRecipes = new ArrayList();
                    String[] string20 = string2.split(";");

                    for (int int6 = 0; int6 < string20.length; int6++) {
                        String string21 = string20[int6].trim();
                        this.teachedRecipes.add(string21);
                        if (Translator.debug) {
                            Translator.getRecipeName(string21);
                        }
                    }
                } else if (string1.trim().equalsIgnoreCase("MountOn")) {
                    this.mountOn = new ArrayList();
                    String[] string22 = string2.split(";");

                    for (int int7 = 0; int7 < string22.length; int7++) {
                        this.mountOn.add(string22[int7].trim());
                    }
                } else if (string1.trim().equalsIgnoreCase("PartType")) {
                    this.partType = string2;
                } else if (string1.trim().equalsIgnoreCase("ClothingItem")) {
                    this.ClothingItem = string2;
                } else if (string1.trim().equalsIgnoreCase("EvolvedRecipe")) {
                    String[] string23 = string2.split(";");

                    for (int int8 = 0; int8 < string23.length; int8++) {
                        String string24 = string23[int8];
                        Object object = null;
                        int int9 = 0;
                        boolean _boolean = false;
                        if (!string24.contains(":")) {
                            object = string24;
                        } else {
                            object = string24.split(":")[0];
                            String string25 = string24.split(":")[1];
                            if (!string25.contains("|")) {
                                int9 = Integer.parseInt(string24.split(":")[1]);
                            } else {
                                String[] string26 = string25.split("\\|");

                                for (int int10 = 0; int10 < string26.length; int10++) {
                                    if ("Cooked".equals(string26[int10])) {
                                        _boolean = true;
                                    }
                                }

                                int9 = Integer.parseInt(string26[0]);
                            }
                        }

                        ItemRecipe itemRecipe = new ItemRecipe(this.name, this.module.getName(), int9);
                        EvolvedRecipe evolvedRecipe0 = null;

                        for (EvolvedRecipe evolvedRecipe1 : ((ScriptModule)ScriptManager.instance.ModuleMap.get("Base")).EvolvedRecipeMap) {
                            if (evolvedRecipe1.name.equals(object)) {
                                evolvedRecipe0 = evolvedRecipe1;
                                break;
                            }
                        }

                        itemRecipe.cooked = _boolean;
                        if (evolvedRecipe0 == null) {
                            evolvedRecipe0 = new EvolvedRecipe((String)object);
                            ((ScriptModule)ScriptManager.instance.ModuleMap.get("Base")).EvolvedRecipeMap.add(evolvedRecipe0);
                        }

                        evolvedRecipe0.itemsList.put(this.name, itemRecipe);
                    }
                } else if (string1.trim().equalsIgnoreCase("StaticModel")) {
                    this.staticModel = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("worldStaticModel")) {
                    this.worldStaticModel = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("primaryAnimMask")) {
                    this.primaryAnimMask = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("secondaryAnimMask")) {
                    this.secondaryAnimMask = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("primaryAnimMaskAttachment")) {
                    this.primaryAnimMaskAttachment = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("secondaryAnimMaskAttachment")) {
                    this.secondaryAnimMaskAttachment = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("replaceInSecondHand")) {
                    this.replaceInSecondHand = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("replaceInPrimaryHand")) {
                    this.replaceInPrimaryHand = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("replaceWhenUnequip")) {
                    this.replaceWhenUnequip = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("EatType")) {
                    this.eatType = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("IconsForTexture")) {
                    this.IconsForTexture = new ArrayList();
                    String[] string27 = string2.split(";");

                    for (int int11 = 0; int11 < string27.length; int11++) {
                        this.IconsForTexture.add(string27[int11].trim());
                    }
                } else if (string1.trim().equalsIgnoreCase("BloodLocation")) {
                    this.bloodClothingType = new ArrayList();
                    String[] string28 = string2.split(";");

                    for (int int12 = 0; int12 < string28.length; int12++) {
                        this.bloodClothingType.add(BloodClothingType.fromString(string28[int12].trim()));
                    }
                } else if (string1.trim().equalsIgnoreCase("MediaCategory")) {
                    this.recordedMediaCat = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("AcceptMediaType")) {
                    this.acceptMediaType = Byte.parseByte(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("NoTransmit")) {
                    this.noTransmit = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("WorldRender")) {
                    this.worldRender = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("CantEat")) {
                    this.CantEat = Boolean.parseBoolean(string2.trim());
                } else if (string1.trim().equalsIgnoreCase("OBSOLETE")) {
                    this.OBSOLETE = string2.trim().toLowerCase().equals("true");
                } else if (string1.trim().equalsIgnoreCase("OnCreate")) {
                    this.LuaCreate = string2.trim();
                } else if (string1.trim().equalsIgnoreCase("SoundParameter")) {
                    String[] string29 = string2.split("\\s+");
                    if (this.soundParameterMap == null) {
                        this.soundParameterMap = new HashMap();
                    }

                    this.soundParameterMap.put(string29[0].trim(), string29[1].trim());
                } else {
                    DebugLog.log("adding unknown item param \"" + string1.trim() + "\" = \"" + string2.trim() + "\"");
                    if (this.DefaultModData == null) {
                        this.DefaultModData = LuaManager.platform.newTable();
                    }

                    try {
                        Double _double = Double.parseDouble(string2.trim());
                        this.DefaultModData.rawset(string1.trim(), _double);
                    } catch (Exception exception0) {
                        this.DefaultModData.rawset(string1.trim(), string2);
                    }
                }
            } catch (Exception exception1) {
                throw new InvalidParameterException("Error: " + str.trim() + " is not a valid parameter in item: " + this.name);
            }
        }
    }

    public int getLevelSkillTrained() {
        return this.LvlSkillTrained;
    }

    public int getNumLevelsTrained() {
        return this.NumLevelsTrained;
    }

    public int getMaxLevelTrained() {
        return this.LvlSkillTrained == -1 ? -1 : this.LvlSkillTrained + this.NumLevelsTrained;
    }

    public List<String> getTeachedRecipes() {
        return this.teachedRecipes;
    }

    public float getTemperature() {
        return this.Temperature;
    }

    public void setTemperature(float temperature) {
        this.Temperature = temperature;
    }

    public boolean isConditionAffectsCapacity() {
        return this.ConditionAffectsCapacity;
    }

    public int getChanceToFall() {
        return this.chanceToFall;
    }

    public float getInsulation() {
        return this.insulation;
    }

    public void setInsulation(float f) {
        this.insulation = f;
    }

    public float getWindresist() {
        return this.windresist;
    }

    public void setWindresist(float w) {
        this.windresist = w;
    }

    public float getWaterresist() {
        return this.waterresist;
    }

    public void setWaterresist(float w) {
        this.waterresist = w;
    }

    public boolean getObsolete() {
        return this.OBSOLETE;
    }

    public String getAcceptItemFunction() {
        return this.AcceptItemFunction;
    }

    public ArrayList<BloodClothingType> getBloodClothingType() {
        return this.bloodClothingType;
    }

    public String toString() {
        return this.getClass().getSimpleName()
            + "{Module: "
            + (this.module != null ? this.module.name : "null")
            + ", Name:"
            + this.name
            + ", Type:"
            + this.type
            + "}";
    }

    public String getReplaceWhenUnequip() {
        return this.replaceWhenUnequip;
    }

    public void resolveItemTypes() {
        this.AmmoType = ScriptManager.instance.resolveItemType(this.module, this.AmmoType);
        this.magazineType = ScriptManager.instance.resolveItemType(this.module, this.magazineType);
        if (this.RequireInHandOrInventory != null) {
            for (int _int = 0; _int < this.RequireInHandOrInventory.size(); _int++) {
                String string0 = (String)this.RequireInHandOrInventory.get(_int);
                string0 = ScriptManager.instance.resolveItemType(this.module, string0);
                this.RequireInHandOrInventory.set(_int, string0);
            }
        }

        if (this.ReplaceTypesMap != null) {
            for (String string1 : this.ReplaceTypesMap.keySet()) {
                String string2 = (String)this.ReplaceTypesMap.get(string1);
                this.ReplaceTypesMap.replace(string1, ScriptManager.instance.resolveItemType(this.module, string2));
            }
        }
    }

    public void resolveModelScripts() {
        this.staticModel = ScriptManager.instance.resolveModelScript(this.module, this.staticModel);
        this.worldStaticModel = ScriptManager.instance.resolveModelScript(this.module, this.worldStaticModel);
    }

    public short getRegistry_id() {
        return this.registry_id;
    }

    public void setRegistry_id(short id) {
        if (this.registry_id != -1) {
            WorldDictionary.DebugPrintItem(id);
            throw new RuntimeException(
                "Cannot override existing registry id ("
                    + this.registry_id
                    + ") to new id ("
                    + id
                    + "), item: "
                    + (this.getFullName() != null ? this.getFullName() : "unknown")
            );
        } else {
            this.registry_id = id;
        }
    }

    public String getModID() {
        return this.modID;
    }

    public boolean getExistsAsVanilla() {
        return this.existsAsVanilla;
    }

    public String getFileAbsPath() {
        return this.fileAbsPath;
    }

    public void setModID(String modid) {
        if (GameClient.bClient) {
            if (this.modID == null) {
                this.modID = modid;
            } else if (!modid.equals(this.modID) && Core.bDebug) {
                WorldDictionary.DebugPrintItem(this);
                throw new RuntimeException("Cannot override modID. ModID=" + (modid != null ? modid : "null"));
            }
        }
    }

    public String getRecordedMediaCat() {
        return this.recordedMediaCat;
    }

    public Boolean isWorldRender() {
        return this.worldRender;
    }

    public Boolean isCantEat() {
        return this.CantEat;
    }

    public String getLuaCreate() {
        return this.LuaCreate;
    }

    public void setLuaCreate(String functionName) {
        this.LuaCreate = functionName;
    }

    public String getSoundParameter(String parameterName) {
        return this.soundParameterMap == null ? null : (String)this.soundParameterMap.get(parameterName);
    }

    public static enum Type {
        Normal,
        Weapon,
        Food,
        Literature,
        Drainable,
        Clothing,
        Container,
        WeaponPart,
        Key,
        KeyRing,
        Moveable,
        Radio,
        AlarmClock,
        AlarmClockClothing,
        Map;
    }
}
